// 引入axios
import {get} from '@/utils/request'
export default {
  // 命名空间
  namespaced: true,
  state: {
    // 栏目数组
    logData: []
  },
  mutations: {
    // 接收栏目数据
    SET_CATEGORYDATA(state, payload){
      // 将actions传递过来的数据赋值给state中对应的变量
      state.logData = payload
    }
  },
  actions: {
  
    async getAlllogData({commit}, payload){
      let res = await get("/baseLog/pageQuery", payload)
      // console.log(res);
      // 将异步交互拿到的数据 提交给mutations
      commit('SET_CATEGORYDATA', res.data.list)
    },
  }
}

